/**
 * FeatureWarpingParameter.java
 * 
 * @date: 2012-03-09
 * @author: Xiaoyu Guo (MUN# 200982155)
 * This file is part of the course project for COMP 6752, 
 * Application of Computer Graphics. All the file is written
 * by myself.
 */
package mun.cs6752.project.filter.featureWarping;

import java.util.List;

import mun.cs6752.project.filter.interfaces.IImageFilterParameter;
import mun.cs6752.project.model.Vector2;

/**
 * @author Xiaoyu Guo
 *
 */
public class FeatureWarpingParameter implements IImageFilterParameter {
   
    class LineSegment{
        private Vector2 startPoint;
        private Vector2 endPoint;
        Vector2 getStartPoint() {
            return startPoint;
        }
        void setStartPoint(int x, int y) {
            this.startPoint = new Vector2(x, y);
        }
        Vector2 getEndPoint() {
            return endPoint;
        }
        void setEndPoint(int x, int y) {
            this.endPoint = new Vector2(x, y);
        }
        
        public LineSegment(int x0, int y0, int x1, int y1){
            setStartPoint(x0, y0);
            setEndPoint(x1, y1);
        }
        
        @Override
        public String toString(){
            return String.format("(%1$.1f, %2$.1f) -> (%3$.1f, %4$.1f)", startPoint.getX(), startPoint.getY(), endPoint.getX(), endPoint.getY());
        }
    }
    
    private List<LineSegment> srcLines;
    private List<LineSegment> destLines;
    
    public List<LineSegment> getSrcLines() {
        return srcLines;
    }
    public void setSrcLines(List<LineSegment> srcLines2) {
        this.srcLines = srcLines2;
    }
    public List<LineSegment> getDestLines() {
        return destLines;
    }
    public void setDestLines(List<LineSegment> destLines) {
        this.destLines = destLines;
    }
    
    private static FeatureWarpingParameter s_default = null;
    /**
     * @return
     */
    public static FeatureWarpingParameter getDefault() {
        if(s_default == null){
            s_default = new FeatureWarpingParameter();
        }
        return s_default;
    }
}
